﻿@page
@{
    ViewData["Title"] = "生成实体";
    Layout = "~/Pages/Shared/_Layout.cshtml";
}
@section js{
    <script src="~/views/system/entity.js@(ViewBag.version)"></script>
}
<div class="x_panel search_box">
    <div class="x_title">
        <h2><i class="fa fa-home"></i> 生成表</h2>
        <div class="clearfix"></div>
    </div>

    <div class="x_content">
        <form id="divFrom" class="form-inline">
            <div class="form-group">
                <label for="ex3" class="col-form-label">数据库：</label>
                <input type="text" id="DatabaseName" name="DatabaseName" placeholder="Select" autocomplete="off" />
                <input id="Database" type="hidden" value="0" name="Database" />
            </div>
            <div class="form-group">
                <label for="ex3" class="col-form-label">&nbsp; 表名：</label>
                <input type="text" id="TableName" name="TableName" class="form-control input" placeholder=" 模糊搜索 ">
            </div>

            <button id="btnSearch" type="button" class="btn btn-search"><i class="fa fa-search"></i>搜索</button>
            <button id="btnReset" type="button" class="btn btn-green"><i class="fa fa-refresh"></i>重置</button>
            @Html.Partial("Page")
        </form>
    </div>
    <div class="x_content">
        <button id="btnPath" type="button" class="btn btn-blue"><i class="fa fa-plus"></i>生成实体</button>
        <button id="btnProject" type="button" class="btn btn-blue"><i class="fa fa-plus"></i>生成实体根据方案</button>
    </div>
    <div class="x_content">
        <table id="divGrid"></table>
        <div id="divGridPage" class="pagination"></div>
    </div>
    <div id="divPathOpen" style="display:none">
        <form id="frmPathSave" class="" action="" method="post" novalidate="">
            <div class="x_content" style="margin-top:20px">
                <div class="field item form-group">
                    <label class="col-form-label col-md-2 col-sm-2  label-align">模版<span class="required">*</span></label>
                    <div class="col-md-10 col-sm-9">
                        <input type="text" id="saveTemplateName1" name="TemplateName1" placeholder="Select" autocomplete="off" />
                        <input id="saveTemplateId1" type="hidden" value="0" name="TemplateId1" />
                    </div>
                </div>
                <div class="field item form-group">
                    <label class="col-form-label col-md-2 col-sm-2  label-align">生成路径<span class="required">*</span></label>
                    <div class="col-md-10 col-sm-9">
                        <input id="savePath" name="Path" type="text" value="C:\suagrdemo\database" class="form-control" />

                    </div>
                </div>
                <div class="field item form-group">
                    <label class="col-form-label col-md-2 col-sm-2  label-align">文件名称<span class="required">*</span></label>
                    <div class="col-md-10 col-sm-9">
                        <input id="saveFileName" name="FileFormat" type="text" class="form-control" />
                    </div>
                </div>
                <div class="field item form-group">
                    <label class="col-form-label col-md-2 col-sm-2  label-align">.NET类库<span class="required">*</span></label>
                    <div class="col-md-10 col-sm-9">
                        <input type="text" id="saveNetVersionName" name="NetVersion" placeholder="Select" autocomplete="off" />
                        <input id="saveNetVersion" type="hidden" value="0" name="NetVersion" />
                    </div>
                </div>
                <div class="field item form-group">
                    <label class="col-form-label col-md-2 col-sm-2  label-align">类库名<span class="required">*</span></label>
                    <div class="col-md-10 col-sm-9">
                        <input id="saveLibraryName" name="LibraryName" value="默认取命名空间" type="text" class="form-control" />
                    </div>
                </div>
                <div class="field item form-group">
                    <label class="col-form-label col-md-2 col-sm-2  label-align">Nuget引用<span class="required">*</span></label>
                    <div class="col-md-10 col-sm-9">
                        <input type="text" id="saveNugetName" name="NugetName" placeholder="Select" autocomplete="off" />
                        <input id="saveNuget" type="hidden" value="0" name="Nuget" />
                    </div>
                </div>
                <div class="field item form-group">
                    <label class="col-form-label col-md-2 col-sm-2  label-align">保存方案</label>
                    <div class="col-md-10 col-sm-9">
                        <input id="saveProjentName" name="ProjentName" type="text" class="form-control" placeholder="填写方案名称可以保当前操作，方便下次使用" />
                    </div>
                    <input id="SaveTable1" type="hidden" name="Tables" value="" />
                </div>
            </div>
        </form>
    </div>
    <div id="divProject" style="display:none">
        <form id="frmProjectSave" class="" action="" method="post" novalidate="">
            <div class="x_content" style="margin-top:20px">
                <div class="field item form-group">
                    <label class="col-form-label col-md-2 col-sm-2  label-align">模版<span class="required">*</span></label>
                    <div class="col-md-10 col-sm-9">
                        <input type="text" id="saveDbTypeName" name="DbTypeName" placeholder="Select" autocomplete="off" />
                        <input id="saveDbType" type="hidden" value="0" name="DbType" />
                    </div>
                </div>
                <div class="field item form-group">
                    <label class="col-form-label col-md-2 col-sm-2  label-align">路径<span class="required">*</span></label>
                    <div class="col-md-10 col-sm-9">
                        <input type="file" webkitdirectory directory />
                    </div>
                </div>
                <div class="field item form-group">
                    <label class="col-form-label col-md-2 col-sm-2  label-align">连接字符串<span class="required">*</span></label>
                    <div class="col-md-10 col-sm-9">
                        <input id="saveConnection" name="Connection" class="form-control" type="text" />
                    </div>
                </div>
            </div>
    
        </form>
    </div>
</div>
